{layout name="../common/master"/}
<div id="right">
       <h4 style="border-bottom: 1px solid #ccc;padding-bottom: 3px">交易失败列表</h4>
    <form action="" method="get" role="form">
        <div class="form-group">

            <label for="">用户ID：</label>
            <input name="userId" {if condition="isset($_GET['userId'])"} value="{$_GET['userId']}" {/if} type="text"/>

            <label for="">用户电话：</label>
            <input name="userPhone" {if condition="isset($_GET['userPhone'])"} value="{$_GET['userPhone']}" {/if} type="text"/>

            <label for="">交易时间：</label>
            <input name="upCreateTime" {if condition="isset($_GET['upCreateTime'])"} value="{$_GET['upCreateTime']}" {/if} type="text" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
            ~
            <input name="downCreateTime" {if condition="isset($_GET['downCreateTime'])"} value="{$_GET['downCreateTime']}" {/if} type="text" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>

        </div>
        <button type="submit" class="btn btn-primary">查询</button>
    </form>
    <div>
        <button id="extend" type="submit" class="btn btn-info">导出到EXCEL</button>
    </div>
    <table class="table-bordered table  table-hover" style="margin-top: 20px;">
        <thead>
        <tr>
            <th>ID</th>
            <th>用户ID</th>
            <th>用户电话</th>
            <th>借款ID</th>
            <th>交易状态</th>
            <th>用户银行卡</th>
            <th>打款金额</th>
            <th>创建时间</th>
        </tr>
        </thead>
        <tbody>
        {foreach name="data" item="vo" key="k"}
            <tr>
                <th><a target="_blank" href="{:URL('home/Userloan/userLoanInfo',['uid'=>$vo['user_loan_id']])}">{$vo['id']}</a></th>
                <th>{$vo['user_id']}</th>
                <th>{$vo['user_phone']}</th>
                <th>{$vo['user_loan_id']}</th>
                {if condition="$vo['payed_status'] eq 'pending'"}
                   <th>交易中</th>
                {elseif condition="$vo['payed_status'] eq 'resolve'"}
                   <th>成功</th>
                {elseif condition="$vo['payed_status'] eq 'reject'"}
                   <th>失败</th>
                {/if}
                <th>{$vo['user_bank_card']}</th>
                <th>{$vo['money']}</th>
                <th>{$vo['update_time']}</th>
            </tr>
        {/foreach}
        </tbody>
    </table>
    {$page} 总数：{$totalCount}

</div>
<script>
    $("#extend").click(function () {
        var url="{:URL('home/Transaction/transactionNoList',$_GET)}";
        url=url+"&extend=1";
        location.href=url;
    })
</script>
<script type="text/javascript" src="__PUBLIC__/home/tuo/DatePicker/WdatePicker.js"></script>
